package yuan.deng.spb.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import yuan.deng.spb.domain.User;
import yuan.deng.spb.uservice.UserService;

import java.util.List;

/**
 * @Description:
 * @Version: V1.0
 */

@RestController
public class UserController {

    @Autowired
    private UserService userServiceImpl;

    @Autowired
    private RedisTemplate redisTemplate;

    @RequestMapping("/a")
    public String findAll(){
        List<User> all = userServiceImpl.findAll();
        System.out.println(all);
        return null;
    }


    @RequestMapping("/b")
    public String findUsername(String username){
        String password=userServiceImpl.findPassword(username);
        System.out.println(password);
        return password;
    }

}
